package com.annotation.demo;

import java.io.IOException;
import java.sql.SQLException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.annotation.BaseSeverlet;
import com.annotation.MethodAnnotation;
import com.annotation.ServiceAnnotation;

/**
 * Servlet implementation class TestS
 */
@WebServlet(description = "注解测试", urlPatterns = { "/ts" })
public class TestS extends BaseSeverlet {
	private static final long serialVersionUID = 1L;
	

	
    /**
     * @see HttpServlet#HttpServlet()
     */
    public TestS() {
        super();
        // TODO Auto-generated constructor stub
    }

    @MethodAnnotation(method="ql")
    public void queryList(HttpServletRequest request, HttpServletResponse response){
        	 try {
        		new  TestService().getPre_infoByid("1");
				response.getWriter().write("<script>alert('你调用了查询方法！......queryList')</script>");
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
            
    }
    
   

}
